from loguru import logger
import os

logger.add("algorithm.log")
logger.success("program is running")
import os
dirpath = '/Users/linrui/downloads/tdx/export/20220202_Test'
listdir = os.listdir(dirpath)

logger.success(type(listdir))
liststr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
print(type(liststr))
logger.success(liststr)
list_size =len(liststr)
i=1
j=1
M=11
print("M=",list_size % M)
for __list in liststr:
    if i % M ==0:
        x=j-M
        y=i
        print(liststr[x:y])
    if j>(list_size-list_size % M):
        x=list_size-list_size % M
        y=list_size
        print(liststr[x:y])
        break
    i+=1
    j+=1
logger.success(list_size)
